package com.tao.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * @author  诸葛先生
 * 功能：聊天信息实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("message")
public class Message {
    /**
     * 消息id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 类型
     */
    @TableField(exist = false)
    private Integer type;
    /**
     * 接受者id
     */
    private Long toId;
    /**
     * 内容
     */
    private String content;
    private Long createBy;
    @TableField(fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 删除标志
     */
    private Integer delFlag;

}
